﻿using System;
using MassPokerTool.Infrastructure.Hooking.Data;
using MassPokerTool.Infrastructure.Logging;

namespace MassPokerTool.Infrastructure.Hooking.Handlers
{
    public class CalculatorBitBltHookHandler : IHookHandler
    {
        private readonly ILogger _log;

        public CalculatorBitBltHookHandler(ILogger log)
        {
            _log = log;
        }

        public void Handle(IHookData parameter)
        {
            var hookData = parameter as CalculatorBitBltHookData;
            if (hookData != null)
            {
                try
                {
                    _log.Debug(string.Format("WindowName: {0}", hookData.WindowName));
                }
                catch (Exception e)
                {
                    _log.Error(e.ToString());
                }
            }
        }
    }
}
